class VarietyModel {
  int code;
  String message;
  Data data;

  VarietyModel({this.code, this.message, this.data});

  VarietyModel.fromJson(Map<String, dynamic> json) {
    code = json['code'];
    message = json['message'];
    data = json['data'] != null ? new Data.fromJson(json['data']) : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['code'] = this.code;
    data['message'] = this.message;
    if (this.data != null) {
      data['data'] = this.data.toJson();
    }
    return data;
  }
}

class Data {
  bool isFirst;
  bool isLast;
  int count;
  int totalPages;
  int page;
  int totalCount;
  List<Items> items;

  Data(
      {this.isFirst,
      this.isLast,
      this.count,
      this.totalPages,
      this.page,
      this.totalCount,
      this.items});

  Data.fromJson(Map<String, dynamic> json) {
    isFirst = json['isFirst'];
    isLast = json['isLast'];
    count = json['count'];
    totalPages = json['totalPages'];
    page = json['page'];
    totalCount = json['totalCount'];
    if (json['items'] != null) {
      items = new List<Items>();
      json['items'].forEach((v) {
        items.add(new Items.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['isFirst'] = this.isFirst;
    data['isLast'] = this.isLast;
    data['count'] = this.count;
    data['totalPages'] = this.totalPages;
    data['page'] = this.page;
    data['totalCount'] = this.totalCount;
    if (this.items != null) {
      data['items'] = this.items.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class Items {
  int id;
  int videoId;
  String title;
  int type;
  String area;
  String year;
  String category;
  String introduction;
  String director;
  String actor;
  String imgUrl;
  String updateText;
  bool isEnd;
  int priority;
  int createTime;
  int updateTime;

  Items(
      {this.id,
      this.videoId,
      this.title,
      this.type,
      this.area,
      this.year,
      this.category,
      this.introduction,
      this.director,
      this.actor,
      this.imgUrl,
      this.updateText,
      this.isEnd,
      this.priority,
      this.createTime,
      this.updateTime});

  Items.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    videoId = json['videoId'];
    title = json['title'];
    type = json['type'];
    area = json['area'];
    year = json['year'];
    category = json['category'];
    introduction = json['introduction'];
    director = json['director'];
    actor = json['actor'];
    imgUrl = json['imgUrl'];
    updateText = json['updateText'];
    isEnd = json['isEnd'];
    priority = json['priority'];
    createTime = json['createTime'];
    updateTime = json['updateTime'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['videoId'] = this.videoId;
    data['title'] = this.title;
    data['type'] = this.type;
    data['area'] = this.area;
    data['year'] = this.year;
    data['category'] = this.category;
    data['introduction'] = this.introduction;
    data['director'] = this.director;
    data['actor'] = this.actor;
    data['imgUrl'] = this.imgUrl;
    data['updateText'] = this.updateText;
    data['isEnd'] = this.isEnd;
    data['priority'] = this.priority;
    data['createTime'] = this.createTime;
    data['updateTime'] = this.updateTime;
    return data;
  }
}
